<template>
  <div>
    <div>子组件</div>
    <h3>{{ params }}</h3>
    <h3>{{ testMsg }}</h3>
    <h3>{{ test }}</h3>
  </div>
  <img
    src="https://img0.baidu.com/it/u=4188108563,4118285765&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500"
  />
</template>
<script setup>
import { defineProps, ref, defineExpose, inject } from "vue";
const props = defineProps({
  params: {
    type: String,
    default: "default",
  },
});
const test = inject("test");
const testMsg = ref("测试");
defineExpose({ testMsg });
</script>
